/**
 *通用形列表-列表部分
 */
<template>
    <el-table 
        :data="tableObj?.tableData" 
        :border="tableObj.tableBorder"
        :row-class-name="tableObj.tableRowClassName" 
        :height="tableObj.tableHeight"
        :max-height="tableObj.tableMaxHeight"
        class="my-table"
    >
        <el-table-column 
            v-for="(item, index) in tableObj.tableColumn"
            :key="`${index}`"
            :prop="item.tableProp" 
            :label="item.tableLabel" 
            :width="item.tableWidth" 
            :show-overflow-tooltip="item.tableShowOverflowTooltip"
            :fixed="item.tableFixed"
        >
            
        </el-table-column>
    </el-table>
</template>

<script lang="ts" setup>
    import { ref, reactive, markRaw, onBeforeMount, onMounted, onBeforeUnmount, nextTick, computed, watch  } from 'vue'
    import type { Ref, Raw } from 'vue'
    import {  } from '@/apis'
    import { isPhone } from '@/utils/utils'

    import { useRoute, useRouter } from 'vue-router'
    import { storeToRefs } from 'pinia'
    import { useStore } from '@/store'
    import { ElMessage } from 'element-plus'
    import {
        Lock,
        User,
        Monitor,
        Phone,
        Search,
        RefreshRight,
        CaretTop,
        CaretBottom,
    } from '@element-plus/icons-vue'
    const route = useRoute()
    const router = useRouter()
    const store = useStore()
    
    const tableObj = defineModel<any>('tableObj', {
        required: false,
        default: {
            tableData: [],
            tableColumn: [],
        }
    })
    const emits = defineEmits<{
        // (e: 'update:isCollapse', data: boolean): void,
        'tabelSearch': [data: any]
    }>()
    
    
</script>

<style lang="scss" scoped>
    .my-table {
        width: 100%
    }
    // tableRowClassName写的自定义样式
    .my-table :deep(.warning-row) {
        --el-table-tr-bg-color: var(--el-color-warning-light-9);
    }
    .my-table :deep(.success-row ) {
        --el-table-tr-bg-color: var(--el-color-success-light-9);
    }
    
</style>